Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds hookas #1124

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open

Adds hookas #1124

wants to merge 13 commits into from

Conversation

mcbalaam
Copy link

@mcbalaam mcbalaam commented Feb 3, 2025

Что этот PR делает

Добавляет кальян!

image

В кальян можно залить любые реагенты или еду, которые и будут... куриться. Для работы кальяна требуются специальные угли, которые могут быть заказаны в карго вместе с кальяном в виде комплекта или куплены в премиум разделе автомата с сигаретами.

Однако, будьте аккуратны с тем, что курите...

image

Почему это хорошо для игры

Кальянчик - это шикарно. Кальянчик в тёмном углу бара как ничто сближает людей. А возможность попыхивать за беседой - это нереально атмосферно.

Изображения изменений

Скриншоты

Снимок экрана 2025-02-03 213920
Снимок экрана 2025-02-03 222458
Снимок экрана 2025-02-03 222616
Снимок экрана 2025-02-03 222625
image
image

Тестирование

Тестирование проведено на локалке

To-do list

  • обработка еды по списку
  • улучшенный дым
  • звуки

Аттрибуция

Спрайт кальяна - dj34 (отредактирован мной)
Спрайт кубиков - ell_good

Changelog

🆑
add: Кальяны! Учёные врут, курите сейчас!
/:cl:

Summary by Sourcery

New Features:

  • Adds functional hookahs that can be loaded with reagents and lit with coals.

This comment was marked as spam.

@github-actions github-actions bot added the 🖌️ Спрайты Вы заработали свою миска-рис и кошко-жена. Партия гордится вами! label Feb 3, 2025
#define COUGH_STAMINA_LOSS 5

/obj/machinery/hookah
name = "кальян"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

все названия в ru_names.toml

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

принято

@mcbalaam mcbalaam marked this pull request as ready for review February 3, 2025 20:05
@ss220app ss220app bot added the 📜 CL валиден Этот чейнджлог будет успешно опубликован label Feb 3, 2025
@dj-34
Copy link
Collaborator

dj-34 commented Feb 3, 2025

тесты все упали

@mcbalaam
Copy link
Author

mcbalaam commented Feb 4, 2025

знаю, это из-за харддела. но починить смогу только после пар

@mcbalaam mcbalaam requested a review from larentoun February 5, 2025 11:56
Copy link
Collaborator

@larentoun larentoun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Везде, где ты в тексте использует "кальян" и "мундштук", используй атом, а именно декленти атом. Это нужно, если появятся новые виды кальянов и мундштуков, а также если админы поменяли название.

Comment on lines +9 to +16
/datum/modpack/bar_hookahs/pre_initialize()
. = ..()

/datum/modpack/bar_hookahs/initialize()
. = ..()

/datum/modpack/bar_hookahs/post_initialize()
. = ..()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/datum/modpack/bar_hookahs/pre_initialize()
. = ..()
/datum/modpack/bar_hookahs/initialize()
. = ..()
/datum/modpack/bar_hookahs/post_initialize()
. = ..()

Лишнее

Comment on lines +1 to +7
/datum/modpack/bar_hookahs
/// A string name for the modpack. Used for looking up other modpacks in init.
name = "bar_hookahs"
/// A string desc for the modpack. Can be used for modpack verb list as description.
desc = "Добавляет кальяны и угли к ним."
/// A string with authors of this modpack.
author = "mcbalaam"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/datum/modpack/bar_hookahs
/// A string name for the modpack. Used for looking up other modpacks in init.
name = "bar_hookahs"
/// A string desc for the modpack. Can be used for modpack verb list as description.
desc = "Добавляет кальяны и угли к ним."
/// A string with authors of this modpack.
author = "mcbalaam"
/datum/modpack/bar_hookahs
name = "Bar Hookah"
desc = "Добавляет кальяны и угли к ним."
author = "mcbalaam"


var/static/allowed_ingridients = typecacheof(list(
/obj/item/food/grown,
/obj/item/food/cheese
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/obj/item/food/cheese
/obj/item/food/cheese,


/obj/machinery/hookah/examine()
. = ..()
. += "<span class='info'>ALT+ЛКМ погасит кальян, ALT+ПКМ очистит ёмкость.</span>"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
. += "<span class='info'>ALT+ЛКМ погасит кальян, ALT+ПКМ очистит ёмкость.</span>"
. += span_info("Alt+ЛКМ погасит кальян, Alt+ПКМ очистит ёмкость.")

var/food_string = ""
var/count = 1
for(var/obj/item/food/this_food in food_items)
food_string += this_food.name
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
food_string += this_food.name
food_string += this_food.declent_ru(NOMINATIVE)

Выбери правильный падеж сам


/obj/item/hookah_coals/examine()
. = ..()
. += "<span class='info'>В кучке три кубика.</span>"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

спан макрос

Comment on lines +239 to +246
if(attachment)
var/atom/attached_to = attachment.attached_to
if(!(get_dist(src, attached_to) <= 1 && isturf(attached_to.loc)))
if(ismob(attached_to))
var/mob/user = attached_to
user.dropItemToGround(this_mouthpiece)
to_chat(user, span_warning("Вы отпускаете мундштук."))
QDEL_NULL(attachment)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if(attachment)
var/atom/attached_to = attachment.attached_to
if(!(get_dist(src, attached_to) <= 1 && isturf(attached_to.loc)))
if(ismob(attached_to))
var/mob/user = attached_to
user.dropItemToGround(this_mouthpiece)
to_chat(user, span_warning("Вы отпускаете мундштук."))
QDEL_NULL(attachment)
if(!attachment)
return
var/atom/attached_to = attachment.attached_to
if(!(get_dist(src, attached_to) <= 1 && isturf(attached_to.loc)))
if(ismob(attached_to))
var/mob/user = attached_to
user.dropItemToGround(this_mouthpiece)
to_chat(user, span_warning("Вы отпускаете мундштук."))
QDEL_NULL(attachment)

немного лесенку уменьшим

if(!do_after(user, 2 SECONDS, src))
return CLICK_ACTION_BLOCKING
reagent_container.reagents.clear_reagents()
to_chat(user, span_notice("Вы очистили внутреннее хранилище реагентов кальяна."))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
to_chat(user, span_notice("Вы очистили внутреннее хранилище реагентов кальяна."))
to_chat(user, span_notice("Вы очищаете внутреннее хранилище реагентов кальяна."))

Мы все действия пишем в настоящем времени для консистенси

return ..()

/obj/item/hookah_mouthpiece/proc/start_inhale(mob/living/carbon/human/user)
user.visible_message(span_notice("[user] затягивается из кальяна."), span_notice("Вы затягиваетесь..."))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

деклент

if(transferred)
to_chat(user, span_notice("Вы вдыхаете дым из кальяна."))
user.add_mood_event("smoked", /datum/mood_event/smoked)
if(world.time < (last_inhale + INHALE_COOLDOWN))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Надо использовать COOLDOWN_DECLARE для таких

@PhantornRU
Copy link

Крайне важный вопрос. Шланг надеюсь слой наложения? Ибо когда берешь мундштук он должен пропадать, заменяясь эффектом протянутого шланга (как у капельницы)

#define INHALE_COOLDOWN 5 SECONDS
#define COUGH_STAMINA_LOSS 5

/obj/machinery/hookah
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Кальян не должен быть машинерией

@dj-34 dj-34 added the 🔬 Testmerge Active Находится в тестмерже на сервере label Feb 24, 2025
Copy link

github-actions bot commented Mar 4, 2025

This PR has been inactive for long enough to be automatically marked as stale. This means it is at risk of being auto closed in ~ 7 days, please address any outstanding review items and ensure your PR is finished, if these are all true and you are auto-staled anyway, you need to actively ask maintainers if your PR will be merged. Once you have done any of the previous actions then you should request a maintainer remove the stale label on your PR, to reset the stale timer. If you feel no maintainer will respond in that time, you may wish to close this PR youself, while you seek maintainer comment, as you will then be able to reopen the PR yourself

@github-actions github-actions bot added the 💩 Stale Кажется всем похуй на этот ПР. Жизнь сурова... label Mar 4, 2025
@Gaxeer Gaxeer added 🛡️ Stale Exempt ПР не может быть устаревшим. Но всем всё равно на него похуй. and removed 💩 Stale Кажется всем похуй на этот ПР. Жизнь сурова... labels Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔬 Testmerge Active Находится в тестмерже на сервере 🖌️ Спрайты Вы заработали свою миска-рис и кошко-жена. Партия гордится вами! 📜 CL валиден Этот чейнджлог будет успешно опубликован 🛡️ Stale Exempt ПР не может быть устаревшим. Но всем всё равно на него похуй.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants